<template>
	<div class="actives">
		<div class="fixed">
			<div class="title flex">
				<div class="title_left">
					<img @click="back" src="../assets/image/return.png" />
				</div>
				<div class="add">
					我的会员
				</div>
				<div>

				</div>
			</div>

			<div class="top flex">

				<div v-for="(item,index) in nameoptions" v-bind:class="{active:index==isActive}" @click="checkItem(index)">{{item.titile}}</div>

			</div>
			<div class="search flex">
				<input type="text" placeholder="搜索会员" /> <span>搜索</span>
				<img src="../assets/image/search_img.png"/>
			</div>
		</div>
		<div class="lists" v-if="1==1">
              
			<div class="list " v-for="(item,index) in tableData" :key="index">
				
				<div  class="mes flex">
					<div class="left flex">
						<div>{{item.member_mobile}}</div>
						<div class="flex foot_mes">
							<div class="flex">
								<img src="../assets/image/ji.png"/>
						      <span>{{item.member_in_way}}级</span>
							</div>
							<div class="flex">
								<img src="../assets/image/jifen.png"/>

						      <span>{{item.member_integral}}分</span>
							</div>
						</div>
					</div>
					<div class="right flex">
						邀请入驻
					</div>
				</div>
			</div>
		</div>
		<div class="none flex" v-else>
		空空如也哦~
		</div>
	</div>
	
</template>

<script>
	export default {
		data() {
			return {
				isActive: 0,
				show: -1,
				activeIndex: -1,
				liyou:"拒绝该商家参与此拼券活动的拒绝理由说明，仅文字展示即可，点击该弹窗右上角的“×”，或下方“我知道了”按钮，效果均为关闭该弹窗。",
				nameoptions: [{
						titile: '全部会员'
					},
					{
						titile: '我的会员'
					},
					{
						titile: '联盟会员'
					}
				],
				tableHeight: null,
				tableData: ''
			}
		},
		//在模板渲染成html前调用，即通常初始化某些属性值，然后再渲染成视图
		created: function() {
           
		},
		methods: {
			back() {
				this.$router.go(-1)
			},
			checkItem(index) {
				this.isActive = index;
				var _this = this;
				var qs = require('qs');
				_this.$http.post(_this.baseURL + '/index.php/waveguest/storemy/store_member',qs.stringify({'store_id':localStorage.getItem("store_id"),"key":localStorage.getItem("key")})).then(response => {
					console.log(response)
					_this.tableData = response.data.data
				}).catch(error => {
				
				});
			},
			showop(index) {
				let that = this;
				if(that.show == index) {
					that.show = -1; //在这里就将它赋值为-1  由于：-1 !=  index 所以其他内容隐藏 ，被点击的则打开
				} else {
					that.show = index; //这里是把index赋值给isShow，isShow=index则显示
				}

			},
			//查看详情
			creat_c() {
				this.$router.push({
					path: '/Create_coupons'
				});
			},
			showtost(){
				  $(".mask").css('display', 'block');
				
			},
			yincang(){
				 $(".mask").css('display', 'none');
			},
		},
		mounted() {
            var _this = this;
            var qs = require('qs');
            _this.$http.post(_this.baseURL + '/index.php/waveguest/storemy/store_member',qs.stringify({'store_id':localStorage.getItem("store_id"),"key":localStorage.getItem("key")})).then(response => {
            	console.log(response)
            	_this.tableData = response.data.data
            }).catch(error => {
            
            });
		},
	}
</script>

<style>

</style>
<style scoped="scoped">
	.active {
		color: #007AFF;
	}
	
	.top {
		font-size: 0.60869rem;
		width: 100%;
		max-width: 640px;
		background: white;
		justify-content: space-around;
		padding-bottom: 0.3rem;
	}
	.search{
		width: 100%;
		background: #F5F6FA;
		height: 2rem;
		justify-content: space-around;
		align-items: center;
		position: relative;
	}
	.search>input{
		width: 10.326rem;
		padding-left: 1.5rem;
		height: 1.3rem;
		border-radius: 0.65217rem;
	background: white;
	border: none;
	}
	.search>span{
		width: 2.8043rem;
		height: 1.3rem;
		display: block;
		border-radius: 0.65217rem;
	background: #007AFF;
	text-align: center;
	line-height: 1.3rem;
	color: white;
	font-size: 0.65217rem;
	border: none;
	}
	.search>img{
		width: 0.58695rem;
		height: 0.58695rem;
		position: absolute;
		top: 0.7rem;
		left: 1rem;
	}
	
	.mes {
		margin: 0.5rem;
		font-size: 0.8rem;
		justify-content: space-between;
	}
	
	.mes .right {
		justify-content: flex-end;
		color: #868E91;
		font-size: 0.5217rem;
	color: #868E91;
	align-items: flex-start;
	}
	
	.mes .right>img {
		width: 0.47826rem;
		height: 0.47826rem;
		padding-right: 0.2rem;
	}
	
	.mes .right>span {
		font-size: 0.565217rem;
	}
	
	
	.title_left {
		width: 0.67391rem;
		height: 0.67391rem;
	}
	
	.title_left>img {
		width: 0.67391rem;
		height: 0.67391rem;
	}
	
	.lists {
	
		-webkit-overflow-scrolling : touch;
		position: fixed;
		bottom: 0;
		top: 5rem;
		background: #F5F6FA;
		width: 100%;
		padding: 1rem 0;
		overflow-y: scroll;
		
	}
	
	.list {
		/*border: 1px solid white;*/
		margin-bottom: 0.5rem;
		margin-left: 0.5rem;
		margin-right: 0.5rem;
		padding: 0.1rem 0.3rem;
		background: white;
		background-size: 100%;
		border-radius: 10px;
		
	}
	
	.fixed {
		position: fixed;
		top: 0;
		background: white;
		width: 100%;
		max-width: 640px;
		z-index: 99;
	}
	
	.title {
		width: 90%;
		padding: 0 5% 0 5%;
		height: 2rem;
		font-size: 0.7193rem;
		background: white;
		padding-bottom: 0.45217rem;
		align-items: center;
	}
	
	.title div {
		width: calc(100%/3);
		align-items: center;
	}
	
	.title>div:nth-child(2) {
		text-align: center;
	}
	
	.add>img {
		width: 1rem;
		height: 1rem;
	}
	
	.left {
		flex-direction: column;
		width: 60%;
	}
	
	.mes>.left>div:nth-child(1) {
		color: #3E474E;
		font-size: 0.65217rem;
	}
	
	.mes>.left>div:nth-child(2) {
		color: #3E474E1;
		font-size: 1.10869rem;
		font-weight: 400;
	}
	
	.jujue>.left>div:nth-child(1) {
		color: #BEC2C5;
		font-size: 0.47826rem;
	}
	
	.jujue>.left>div:nth-child(2) {
		color: #BEC2C5;
		font-size: 1.10869rem;
		font-weight: 400;
	}
	
	
	
	.shows {
		border-top: 1px solid #D1D5D8;
		width: 95%;
		margin: auto;
	}
.foot_mes{
	width: 100%;
	padding-top: .5rem;
	
}
.foot_mes>div{
	font-size: 0.5217rem;
	width: calc(100%/2);
	align-items: center;
	
}
.foot_mes>div>img{
width: 0.4347rem;
height: 0.4347rem;
padding-right: 0.5rem;
	
}
.none{
		position: fixed;
		width: 100%;
		height: 100%;
		background: #F5F6FA;
		justify-content: center;
		align-items: center;
		font-size: 0.5217rem;
	}

</style>